<template>
  <el-card class="x-post" @click="toDetail(blog.id)">
    <template class="title" #header>{{ blog.title }}</template>
    <div class="desc">{{ blog.desc }}</div>
  </el-card>
</template>

<script setup>
const props = defineProps(["blog"]);
const { blog } = props;
function toDetail(id) {
  console.log("toDetail: ", id);
}
</script>

<style scoped>
.x-post {
  width: 800px;
}
.desc {
  font-size: small;
}
</style>
